import { OrgImageService } from './../orgImage/orgImage.service';
import { OrgImage } from './../orgImage/models/orgImage.entity';
import { OrganizationResolver } from './organization.resolver';
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';

import { Organization } from './models/organization.entity';
import { OrganizationService } from './organization.service';
// 关联订单，否则报错 https://stackoverflow.com/questions/56693067/entity-metadata-for-roleusers-was-not-found
import { Order } from '../order/models/order.entity';

@Module({
  imports: [TypeOrmModule.forFeature([Organization, OrgImage, Order])],
  providers: [OrganizationService, OrganizationResolver, OrgImageService],
  exports: [OrganizationService],
})
export class OrganizationModule {}
